<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
    <title>标准库管理</title>
    <%-- 全站样式 --%>
    <jsp:include page="/WEB-INF/jsps/template_style.jsp"></jsp:include>
    
</head>

<body class="page-body skin-navy">
<div class="page-container">
   		<%--侧边栏 --%>
		<jsp:include page="/WEB-INF/jsps/sidebar.jsp"></jsp:include>
    <div class="main-content">
   		<%--导航栏 --%>
		<jsp:include page="/WEB-INF/jsps/navbar.jsp"></jsp:include>
        <div class="page-title">
            <div class="title-env">
                <h1 class="title">标准库管理</h1>
                <p class="description">
                    您可以在此页面上查看。
                </p>
            </div>
        </div>
        <div class="row">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3>标准库管理</h3>
                </div>
                <div class="panel-body">                        
               		<form class="form-horizontal" role="form" action='<c:url value='/findspectrum.do'/>' method="post">
                        <div class="form-group">
                            <label class="col-sm-3 control-label" for="spectrumTypeID">光谱类型</label>
                            <div class="col-sm-8">
                                <select class="form-control" name="spectrum.speTypeID" id="spectrumType" onchange="get_detected_object(this.options[this.options.selectedIndex].value)">
                                    <option value="-1">请选择光谱类型</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group-separator"></div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label" for="detectedID">被检测物</label>
                            <div class="col-sm-8">
                                <select class="form-control" name="spectrum.detectedID" id="detectedID"  onchange="get_standard_spectrum(this.options[this.options.selectedIndex].value)">
                                    <option value="-1">请选择被检测物</option>
                                </select> 
                            </div>
                        </div>                       
                        <div class="form-group-separator"></div>
                        <div class="form-group col-sm-6">                      
	                        	<input type="hidden" id="opptionid" name="opptionid" value="">
	                            <button id="reset" type="reset" class="btn btn-gray btn-single pull-right">重置</button>
	                            <button id="search" type="submit" class="btn btn-info btn-single pull-right">检索</button>
	                    </div>
	                    </form>
                     	<div class="form-group-separator"></div>
                    </form>
                </div>
                <div class="panel-body">
                    <div class="tab-content">
                        <div class="tab-pane active">
                            <table class="table table-bordered table-striped" id="example-2">
                                <thead>
                                <tr>
                                	<th></th>
                                    <th>光谱编号</th>
                                    <th>光谱名称</th>
                                    <th>保存时间</th>
                                    <th>光谱描述</th>
                                    <th>被检测物产地</th>
                                    <th>上传用户id</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody class="middle-align">
                                <c:forEach items="${standardspectrum }" var="standard">
                                 <tr>
                                	<td>
                                        <input type="checkbox" class="cbr">
                                    </td>
                                    <td>${standard.Id }</td>
                                    <td>${standard.spectrumName }</td>
                                    <td>${standard.saveTime }</td>
                                    <td>${standard.spectrumDescription }</td>
                                    <td>${standard.categoryOrigin }</td>
                                    <td>${standard.userId }</td>
                                    <td>
                                        <a href="#" onclick="particular_message(${standard.Id }, this)"  class="btn btn-info btn-sm btn-icon icon-left" data-toggle="modal" data-target="#detail">
                                            	查看详细信息
                                        </a>
                                    </td>
							    </tr>
                                </c:forEach>
                               

                              </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
              
   		<%--页脚 --%>
		<jsp:include page="/WEB-INF/jsps/footer.jsp"></jsp:include>
    </div>
</div>

<div class="page-loading-overlay">
    <div class="loader-2"></div>
</div>

<div class="modal fade" id="detail"  tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title">详细信息</h4>
            </div>
                    <div class="modal-body">
                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="control-label">用户名</label>
                                    <input type="text" id="username" class="form-control" disabled/>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="control-label">光谱编号</label>
                                    <input type="text" id="spectrumid" class="form-control" disabled/>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="control-label">光谱名称</label>
                                    <input type="text" id="spectrumName" class="form-control" disabled/>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="control-label">光谱类型名称</label>
                                    <input type="text" id="spectrumtype" class="form-control" disabled/>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-12">
                                <div class="form-group">
                                    <label class="control-label">光谱描述</label>
                                    <textarea  class="form-control autogrow" cols="5" id="spectrumDescription" style="resize: none" disabled>
                                </textarea>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                           
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="control-label" for="spectrumContent">保存时间</label>
                                    <input type="text" id="savetime" class="form-control"disabled/>
                                </div>
                            </div>                          
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="control-label" for="resolutionRate">特征峰值</label>
                                    <input type="text" id="characteristicPeak" class="form-control"disabled/>
                                </div>
                            </div>
                        </div>         
                        <div class="row">                           
                            <div class="col-md-12">
                                <div class="form-group">
                                    <label class="control-label" for="spectrumContent">图片路径</label>
                                    <input type="text" id="picurl" class="form-control"disabled/>
                                </div>
                            </div>                                                  
                        </div>    
                        <div class="row">                           
                            <div class="col-md-12">
                                <div class="form-group">
                                    <label class="control-label" for="spectrumContent">文件地址</label>
                                    <input type="text" id="fileaddress" class="form-control"disabled/>
                                </div>
                            </div>                                                  
                        </div>       
                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="control-label" for="resolutionRate">被检测物名称</label>
                                    <input type="text" id="detectedname" class="form-control"  disabled/>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="control-label" for="resolutionRate">被检测物产地</label>
                                    <input type="text" id="categoryOrigin" class="form-control"  disabled/>
                                </div>
                            </div>
                        </div>                                          
            <div class="modal-footer">
                <button type="button" class="btn btn-white" data-dismiss="modal">Close</button>
            </div>
        </div>
    </div>
</div>


<%-- 尾部内容 --%>
<jsp:include page="/WEB-INF/jsps/template_tail.jsp" />
        
<!-- Imported styles on this page -->
<link rel="stylesheet" href="assets/js/datatables/dataTables.bootstrap.css">
<!-- Imported scripts on this page -->
<script src="assets/js/datatables/js/jquery.dataTables.min.js"></script>
<script src="assets/js/custom/standardspectrum.js"></script>
<script src="assets/js/datatables/dataTables.bootstrap.js"></script>
<script src="assets/js/datatables/yadcf/jquery.dataTables.yadcf.js"></script>
<!--Specific JS for this page-->
<script type="text/javascript">
    jQuery(document).ready(function($) {
        $("#example-2").dataTable({
            aLengthMenu: [
                [5, 10, 25, 50, 100, -1],
                [5, 10, 25, 50, 100, "所有"]
            ]
        });
    });
</script>
</body>

</html>